package com.netnovelstore.controller;

import com.netnovelstore.pojo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
@Api(tags = "系统管理")
@RequestMapping("/Event")
@Slf4j
public class EventController {



    @CacheEvict(value = {"bookCache"},allEntries = true)
    @PostMapping("/clearCache")
    @ApiOperation("清除缓存")
    public Result clearCache(){
        return Result.ok();
    }
}
